#this is just a basic CMakeLists.txt, for more information see the cmake manpage
SET(APP_CPP
main.cpp
BdApp.cpp
BdAjouterLivreManuel.cpp
BdAppInterface.cpp
BdPluginManager.cpp
BdPluginItem.cpp
BdPluginRegistry.cpp
BdPluginMetadata.cpp
)

SET(APP_H
BdApp.h
BdAjouterLivreManuel.h
BdAppInterface.h
BdPluginManager.h
BdPluginItem.h
BdPluginRegistry.h
BdPLuginMetadata.h
)

SET(APP_MOC_H
BdApp.h
BdAjouterLivreManuel.h
BdAppInterface.h
BdPluginManager.h
)

QT4_WRAP_CPP(APP_MOC_CPP ${APP_MOC_H})

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../ui
../core
../plugins
../gui
${CMAKE_CURRENT_SOURCE_DIR} 
${QT_INCLUDE_DIR}
${QT_INCLUDE_DIR}/QtCore
${QT_INCLUDE_DIR}/QtGui
)

ADD_EXECUTABLE(bibliotheque ${APP_CPP} ${APP_MOC_CPP})

#need to link to some other libraries ? just add them here
TARGET_LINK_LIBRARIES(bibliotheque
biblio_core
biblio_gui
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
)

SET_TARGET_PROPERTIES(bibliotheque PROPERTIES
  INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib
  INSTALL_RPATH_USE_LINK_PATH true
  )

INSTALL(TARGETS bibliotheque RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
#add an install target here
#INSTALL_FILES(...)
#INSTALL_PROGRAMS(...)
#INSTALL_TARGET(...)

